Validation of device activity via logic sharing

ABSTRACT

Methods for validating device activity by way of logic sharing are presented. In an example of the method, a text file comprising a script defining programming logic to be executed is received at a first device. The text file is accessed at a second device. Input data for an application executing at the first device is received at the first device. The input data is transmitted from the first device to the second device. The script is executed at the first device from the application using the input data to produce a first result. The script is also executed at the second device from an application using the input data to produce a second result equal to the first result.

TECHNICAL FIELD

The present disclosure relates generally to communication betweencomputing systems, and more particularly to validation of activity in afirst device by a second device via sharing of programming logic betweenthe devices.

BACKGROUND

In many client-server online applications, communications between aclient and a corresponding server in a client-server relationship areemployed to ensure that the state of the application existing in theclient is also reflected in the server. Several reasons may exist forthe server validation of client activity. For example, an online gamingapplication may involve the interaction of multiple clients via theserver. Thus, actions of one client may be reflected or duplicated inthe client so that results of those actions taking place in otherclients may be considered in light of the actions of the first client.In other examples, bonuses, such as “experience points” that may beawarded to the user of the client in response to some favorable actionby the user, may need to be validated in the server before such bonusesare awarded.

Validation of a client action in the server generally involves at leastsome communication between the client and the server. In manyimplementations, a user interaction with a user interface of the clientcauses a communication to the server which describes the actionoccurring in the client. The server then processes the action andtransmits a reply communication to the client to indicate the results ofthe action, which may then be presented to the user. Such use ofround-trip communications may result in a significant delay of theresults of the action being presented to the user, thus negativelyimpacting the user experience.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure is illustrated by way of example, and notlimitation, in the figures of the accompanying drawings, in which likereference numerals indicate similar elements unless otherwise indicated.In the drawings:

FIG. 1 illustrates an example system for implementing various exampleembodiments;

FIG. 2A shows a block diagram illustrating an example computing devicesystem;

FIG. 2B shows a block diagram illustrating an example client device ofthe computing device system of FIG. 2A;

FIG. 2C shows a block diagram illustrating an example server device of acomputing device system of FIG. 2A;

FIG. 3 shows a flowchart illustrating an example method for validatingclient device action in a server device via logic sharing;

FIG. 4 shows a flowchart illustrating an example method for executingprogramming logic provided in a script in an object-orientedenvironment;

FIG. 5A illustrates example server methods for executing programminglogic provided in a script in an object-oriented environment;

FIG. 5B illustrates example client methods for executing programminglogic provided in a script in an object-oriented environment;

FIG. 6 illustrates an example text file including multiple examplescripts;

FIG. 7 illustrates an example text file including an example script foran online gaming environment;

FIG. 8A illustrates example client application code for executing thescript of FIG. 7;

FIG. 8B illustrates example server application code for executing thescript of FIG. 7;

FIG. 9 illustrates an example data flow between the components of anexample system;

FIG. 10 illustrates an example network environment, in which variousexample embodiments may operate; and

FIG. 11 illustrates an example computing system architecture, which maybe used to implement a server or a client system.

DESCRIPTION OF EXAMPLE EMBODIMENTS Overview

To eliminate the need for the round-trip communications between a clientand a server so that the server may validate actions occurring in theclient, the client may process the actions and then inform the server ofthe results of those actions. However, a clever user of the client maybe able to manufacture, alter, or “spoof” the communications from theclient to the server regardless of the actual operation occurring in theclient, leading to improper or fictitious results in the server.

In another example, all processing of client actions may be performed inthe client to provide the user with immediate feedback regarding theresults of the action. The client may also inform the server of theactions, and in response, the server may process the actions in the sameway to duplicate and validate the results generated in the client. Underthis scenario, the processing logic in both the client and the serverare synchronized to ensure the same processing operations are beingperformed. This synchronization may result in logic updates to theclient from the server, which may be difficult to perform and track.Also, if the client portion and server portion of the applications arewritten in different programming languages, each update to theprocessing logic in both the client and the server may involve updatesbeing written in the two different languages.

In at least some embodiments described in greater detail below, a singletext file that includes a script defining programming logic may beprovided to both a client device and a server device. Input datareceived at the client device may be provided to the server device. Thescript may then be executed at both the client device and the serverdevice using the input data to produce the same result. In one example,the client and server may form a portion of an online gaming system,with the script receiving input data regarding one or more user actions.In executing the script at both the client device and the server device,the results or output of the script may be presented to the user of theclient device as soon as the results have been generated, withoutawaiting validation, confirmation, or other communications from theserver device. Such results may include, for example, experience points,gaming features (such as new tools or weapons), advancement in gaminglevels, and/or other game-related data pertaining to the user of theclient device. The server device is able to produce the same resultsthat are generated in the client device, and possibly store thoseresults locally for future use. Further, updates to the programminglogic need only be incorporated into the text file including the script,and not into the applications being executed by the client and serverdevices, which may be written in different programming languages. Inother examples, the use of a script to be executed in both a clientdevice and a server device may be associated with client-server systems,or even distributed computing systems not employing a client-serverarchitecture, that are not associated with an online gaming system.

Example System

FIG. 1 illustrates an example of a system 100 for implementing variousexample embodiments. In some embodiments, the system 100 comprises aplayer 101, a client system 130, a network 160, a social networkingsystem 120 a, and a game networking system 120 b. The components of thesystem 100 may be connected directly or over a network 160, which may beany suitable network. In various embodiments, one or more portions ofthe network 160 may include an ad hoc network, an intranet, an extranet,a virtual private network (VPN), a local area network (LAN), a wirelessLAN (WLAN), a wide area network (WAN), a wireless WAN (WWAN), ametropolitan area network (MAN), a portion of the Internet, a portion ofthe Public Switched Telephone Network (PSTN), a cellular telephonenetwork, or any other type of network, or a combination of two or moresuch networks.

The client system 130 may be any suitable computing device, such as asmart phone, a personal digital assistant (PDA), a mobile phone, apersonal computer, a laptop, a computing tablet, or any other devicesuitable for playing a virtual game. The client system 130 may accessthe social networking system 120 a or the game networking system 120 bdirectly, via the network 160, or via a third party system. For example,the client system 130 may access the game networking system 120 b viathe social networking system 120 a.

The social networking system 120 a may include a network-addressablecomputing system that can host one or more social graphs, and may beaccessed by the other components of system 100 either directly or viathe network 160. The social networking system 120 a may generate, store,receive, and transmit social networking data. Moreover, the gamenetworking system 120 b may include a network-addressable computingsystem (or systems) that can host one or more virtual games, forexample, online games. The game networking system 120 b may generate,store, receive, and transmit game-related data, such as, for example,game application files, game account data, game input, game state data,and game displays.

The game networking system 120 b may be accessed by the other componentsof system 100 either directly or via the network 160. The player 101 mayuse the client system 130 to access, send data to, and receive data fromthe social networking system 120 a and/or the game networking system 120b. Client system 130 can access social networking system 120 a or gamenetworking system 120 b directly, via network 160, or via a third-partysystem. As an example and not by way of limitation, client system 130may access game networking system 120 b via, social networking system120 a. Client system 130 can be any suitable computing device, such as apersonal computer, laptop, cellular phone, smart phone, computingtablet, and so on.

Although FIG. 1 illustrates a particular example of the arrangement ofthe player 101, the client system 130, the social networking system 120a, the game networking system 120 b, and the network 160, thisdisclosure includes any suitable arrangement or configuration of thesecomponents of system 100. As an example and not by way of limitation,system 100 may include one or more game networking systems 120 b and nosocial networking systems 120 a. As another example and not by way oflimitation, system 100 may include a system that comprises both socialnetworking system 120 a and game networking system 120 b. Moreover,although FIG. 1 illustrates a particular arrangement of player 101,social networking system 120 a, game networking system 120 b, clientsystem 130, and network 160, this disclosure contemplates any suitablearrangement of player 101, social networking system 120 a, gamenetworking system 120 b, client system 130, and network 160.

The components of system 100 may be connected to each other using anysuitable connections 110. For example, suitable connections 110 includewireline (such as, for example, Digital Subscriber Line (DSL) or DataOver Cable Service Interface Specification (DOCSIS)), wireless (such as,for example, Wi-Fi or Worldwide Interoperability for Microwave Access(WiMAX)) or optical (such as, for example, Synchronous Optical Network(SONET) or Synchronous Digital Hierarchy (SDH)) connections. Inparticular embodiments, one or more connections 110 each include an adhoc network, an intranet, an extranet, a VPN, a LAN, a WLAN, a WAN, aWWAN, a MAN, a portion of the Internet, a portion of the PSTN, acellular telephone network, or another type of connection, or acombination of two or more such connections. Connections 110 need notnecessarily be the same throughout system 100. One or more firstconnections 110 may differ in one or more respects from one or moresecond connections 110. Although FIG. 1 illustrates particularconnections between player 101, social networking system 120 a, gamenetworking system 120 b, client system 130, and network 160, thisdisclosure contemplates any suitable connections between player 101,social networking system 120 a, game networking system 120 b, clientsystem 130, and network 160. As an example and not by way of limitation,in particular embodiments, client system 130 may have a directconnection to social networking system 120 a or game networking system120 b, bypassing network 160.

Online Games and Game Systems

In an online computer game, a game engine manages the game state of thegame. Game state comprises all game play parameters, including playercharacter state, non-player character (NPC) state, in-game object state,game world state (e.g., internal game clocks, game environment), andother game play parameters. Each player 101 controls one or more playercharacters (PCs). The game engine controls all other aspects of thegame, including non-player characters (NPCs), and in-game objects. Thegame engine also manages game state, including player character statefor currently active (online) and inactive (offline) players.

An online game can be hosted by game networking system 120 b, which canbe accessed using any suitable connection with a suitable client system130. A player may have a game account on game networking system 120 b,wherein the game account can contain a variety of information associatedwith the player (e.g., the player's personal information, financialinformation, purchase history, player character state, and game state).In some embodiments, a player may play multiple games on game networkingsystem 120 b, which may maintain a single game account for the playerwith respect to all the games, or multiple individual game accounts foreach game with respect to the player. In some embodiments, gamenetworking system 120 b can assign a unique identifier to each player101 of an online game hosted on game networking system 120 b. Gamenetworking system 120 b can determine that a player 101 is accessing theonline game by reading the user's cookies, which may be appended to HTTPrequests transmitted by client system 130, and/or by the player 101logging onto the online game.

In particular embodiments, player 101 may access an online game andcontrol the game's progress via client system 130 (e.g., by inputtingcommands to the game at the client device). Client system 130 candisplay the game interface, receive inputs from player 101, transmituser inputs or other events to the game engine, and receive instructionsfrom the game engine. The game engine can be executed on any suitablesystem (such as, for example, client system 130, social networkingsystem 120 a, or game networking system 120 b). As an example and not byway of limitation, client system 130 can download client components ofan online game, which are executed locally, while a remote game server,such as game networking system 120 b, provides backend support for theclient components and may be responsible for maintaining applicationdata of the game, processing the inputs from the player 101, updatingand/or synchronizing the game state based on the game logic and eachinput from the player 101, and transmitting instructions to clientsystem 130. As another example and not by way of limitation, each timeplayer 101 provides an input to the game through the client system 130(such as, for example, by typing on the keyboard or clicking the mouseof client system 130), the client components of the game may transmitthe input of the player 101 to game networking system 120 b.

Shared Logic Examples

FIG. 2A illustrates an example computing device system 200 having afirst (client) device 202 and a second (server) device 204. In oneexample, the first device 202 may be one of the client systems 130 ofthe system 100, while the second device 204 may represent the gamenetworking system 120 b of the system 100, as shown in FIG. 1. In otherimplementations, the first device 202 and the second device 204 mayreside within a client-server system not pertaining to an online socialnetworking or game networking environment. Further, while the firstdevice 202 and the second device 204 are hereinafter referred to as theclient device 202 and the server device 204 participating in aclient-server relationship, the devices 202, 204 may instead be peerdevices in a peer-to-peer communication arrangement, or be any twocomputing devices communicatively coupled together, in otherembodiments.

In FIG. 2A, the client device 202 includes an application 206 to beexecuted, and the server device 204 includes an application 208 to beexecuted. In an online gaming environment, the application 206 may be aclient-side application providing a user of the client device 202 theability to engage in an online game, as described herein. Theapplication 208 may be a server-side application for facilitating theability of multiple users (via multiple client devices 202) to engage inplaying the online game, including the facilitation of interactionbetween users within the context of the online game, among other tasks,as discussed herein.

Each of the applications 206, 208 is configured to execute a script 210which takes input 212 and produces a result 214 a, 214 b. In oneexample, the script 210 is included in a text file that is accessed byboth the client device 202 and the server device 204. In someembodiments, the text file may include more than one script 210.Additionally, more than one text file, with each text file containingone or more scripts 210, may be utilized in both the client device 202and the server device 204. In a further implementation, the script 210may initially be created or reside in the server device 204, after whichthe server device 204 may transfer the script 210 to the client device202 via a communication connection, such as, for example, the Internetor another WAN, Also in an example, the input 212 may be inputs receivedfrom a user of the client device 202 as part of the online game.

As a result of executing the script 210 in the client device 202, aresult 214 a is produced. In the online gaming environment, the result214 a may be any data relating to the actions or status of the user ofthe client device 202 in conjunction with the online game, such asexperience points, increase in experience or playing levels, in-gameawards, new gaming features, and/or the like. Similarly, the serverdevice 204, in executing the same script 210, produces a result 214 bequal to the result 214 a generated in the client device 202. In oneexample, the server device 204 stores the result 214 b or somerepresentation thereof in a database 216 accessible by, or incorporatedwithin, the server device 204. In one implementation, the database 216is associated with the user of the client device 202, which may includedata regarding a status of the user within the online game.

FIG. 2B is a block diagram of an example of the client device 202 ofFIG. 2A. Included in the client device 202 may be one or more processors250, a script evaluation engine module 252, an object-oriented scriptengine invocation method 254 (located in the first application 206 ofFIG. 2A in one example), a communication interface 256, and a userinterface 258. The processor 250 may be any processor capable ofexecuting instructions of the first application 206. The scriptevaluation engine 252 may evaluate, interpret, or execute the script210. In one example, execution of the script 210 may be invoked by theobject-oriented invocation method 254 executed from within the firstapplication 206.

The user interface 258 may receive input data 212 from a user of theclient device 202 to be used as input for the script 210. In someexample, the user interface 258 may include a keyboard, touchpad, touchscreen, joystick, mouse, or other user input means. The user interface258 may also display the results of the execution of the script 210 byway of a visual display component, such as, for example, a liquidcrystal display (LCD).

The communication interface 256 may receive the script 210 from theserver device 204, transmit the input data 212 to the server device 204,receive user status data generated at the server device 204 from theserver device 204, and engage in other communications. In someimplementations, the communication interface 256 may be any interfacethat facilitates communications with the server device 204, as well asother communication nodes. For example, the communication interface 256may be any interface capable of coupling the client device 202 to alocal area network (LAN) (such as, for example, an Ethernet network oran IEEE 802.11x (WiFi®) network) or a wide area network (WAN) (such asthe Internet).

FIG. 2C is a block diagram of an example of the server device 204 ofFIG. 2A. Included in the server device 204 may be, for example, one ormore processors 260, a script evaluation engine module 262, a scriptengine invocation method 264 (located in the second application 208 ofFIG. 2A in one example), a communication interface 266, and a database268. The processor 260 may be any processor capable of executinginstructions of the second application 208, which may be different thatthe first application 206 executing in the client device 202. The scriptevaluation engine 262 may evaluate or interpret the script 210, and maybe different than the script evaluation engine 252 of the client device202. In one example, execution of the script 210 may be invoked by anobject-oriented invocation method 264 executed from within the secondapplication 208. Further, the invocation method 264 may be differentfrom the corresponding invocation method 254 of the client device 202.

The communication interface 266 may transmit the script 210 from theclient device 202, receive the input data 212 from the client device202, transmit user status data generated at the server device 204 to theclient device 202, and engage in other communications. As with thecommunication interface 256 of the client device 202, the communicationinterface 266 may be any interface that facilitates communications withthe client device 202, such as by way of a LAN or WAN.

The user status database 268 may be any database storage systemconfigured to store the result 214 b generated via the execution of thescript 210 in the server device 204. In some examples, the result 214 bmay be transmitted, possibly along with other user status data, via thecommunication interface 266 to the client device 202. Such data transfermay occur, for example, in response to a subsequent execution of thefirst application 206 in the client device 202.

FIG. 3 illustrates a flow diagram of an example method 300 of validatingclient device activity (such as activity in the client device 202 ofFIG. 2A) in a server device (such as the server device 204 of FIG. 2A).In the method 300, a text file including a script 210 definingprogramming logic to be executed is accessed at the server device 204(operation 302). The client device 202 receives the same text file(operation 304), possibly from the server device 204. Input data 212 fora first application 206 executing at the client device 202 is receivedat the client device 202 (operation 306). The input data 212 istransmitted from the client device 202 to the server device 204(operation 308). The script 210 is executed at the client device 202from the first application 206 using the input 212 to produce a firstresult 214 a (operation 310). The script 210 is also executed at theserver device 204 from a second application 208 using the input 212 toproduce a second result 214 b equal to the first result 214 a (operation312). In at least one example, the second result 214 b may be stored ina database 216 associated with a user of the client device 202(operation 314). In addition, the second result 214 b stored in thedatabase 216 may be transmitted from the server device 204 to the clientdevice 202 (or another client device being employed by the user), suchas when the first application 206 is subsequently restarted in theclient device 202 (operation 316).

While the flow diagram of FIG. 3 implies a specific order of executionfor the operations 302-314 of the method 300, other orders of executionof the operations 302-314, including concurrent or simultaneousexecution of one or more of the operations 302-314, may be employed insome examples.

FIG. 4 illustrates a flow diagram of an example method 400 of executingthe script 210 in either or both of the client device 202 and the serverdevice 204 of FIG. 2A. In the method 400, an object associated with amethod is created in an application 206, 208 via a reference to the textfile containing at least one script 210 (operation 402). In theapplication 206, 208, the object-oriented method is invoked byidentifying one of the scripts 210 to be executed and at least one inputparameter based on the input data 212 (operation 404). In theobject-oriented method, the identified script 210 is executed using theat least one input parameter to generate a result 214 (operation 406).Examples of the object-oriented method are described below inconjunction with FIGS. 5A, 5B, 6, 7, 8A, and 8B.

More specifically, FIGS. 5A, 5B, 6, 7, 8A, and 8B illustrate exampleapplication code, as what may be found in applications 206, 208 of FIG.2A, along with example text files, that may be employed to execute theprogramming logic represented in the script 210. In the examples thatfollow, the applications 206, 208 to be executed in their respectivedevices 202, 204 may execute the script 210 by function or method callsprovided within the application 206, 208, or via calls to one or morefunctions or methods provided by an operating system resident on theassociated device 202, 204.

In one example, the application 206 of the client device 202 may be anonline gaming application to be executed in a user device, such as amobile phone, PDA, desktop computer, laptop computer, gaming console,and the like. In the specific examples below, the client deviceapplication 206 may make calls to methods provided by the iOS operatingsystem supplied by Apple Inc. More specifically, the operating systemmay provide a library of methods or routines as part of an engine forinterpreting, evaluating, or executing scripts written in JavaScript®,an object-oriented scripting language.

Also in the examples to follow, the server device 204 may be a webserver or other computing device configured to communicate with theclient device 202 over the Internet or another type of communicationnetwork. In one example, the application 208 of the server device 204may be written in PHP, a general-purpose scripting language oftenemployed to produce web pages and other web-based content. In oneimplementation, the application 208 employs extensions of PHP thatprovide access to a JavaScript evaluation engine, such as SpiderMonkey.

Given the abovementioned programming environment for the client device202 and the server device 204, the scripts 210 discussed below arewritten in JavaScript, although other types of scripting languages maybe employed in other embodiments. Also, in the examples below, the textfile is formatted in Extensible Markup Language (XML), although otherfile formats containing the scripts 210 discussed below may be utilizedin other implementations.

FIG. 5A illustrates example interfaces of server object-oriented methods500 to be executed from the application 208 executing in the serverdevice 204 of FIG. 2A. The methods 500 facilitate the creation of anobject for one or more scripts 210 provided in a text file, as well asthe execution of such scripts 210. An example constructor method 502,labeled “_construct”, creates a “JSValidator” object that will containthe programming logic defined in one or more scripts 210 in a text file.The constructor method 502 receives the name of the text file by way ofan input parameter $scriptXML. In one example, the constructor method502 returns no result or output value. In an implementation, theconstructor method 502 is called indirectly from the application 208when the JSValidator object is instantiated. An example XML file ispresented in FIG. 6, discussed below.

FIG. 5A also provides an example script execution method 504, named“executeScript”, to be executed after the constructor method 502 inresponse to receipt of input data 212. As shown in FIG. 5A, the scriptexecution method 504 receives two or more parameters, the firstparameter being a character or text string identifying the particularscript 210 defined within the XML file that was used to construct theJSValidator object. Use of the first parameter is beneficial at least incases in which more than one script 210 is defined within the XML file.

The second and any additional parameters for executeScript are variablesbased on the input data 212. In some examples, the variables mayrepresent the input data 212 without modification, or may be generatedfrom the input data in some manner. Further, while the particularexample of executeScript in FIG. 5A indicates that the second andadditional parameters are scalar variables, other types of parameters,including characters, character strings, data arrays, data structures,JSON (JavaScript Object Notation) objects, and the like, may be employedas parameters in other implementations. In some implementations,executeScript may perform type validation on one or more of the inputparameters being passed to the script 210.

Upon execution, the script execution method 504 returns the result 214b. In one example, the result 214 b is returned to the calling code ofthe application 208 as a character string. In other implementations, theresult 214 b may be returned as another type of result or value. In suchcases, the data type of the return value may be specified in the script210 being executed. The application 208 may then store the result 214 bas data related to the user of the client device 202 in the database216, as shown in FIG. 2A.

Either or both of the constructor method 502 and the script executionmethod 504 may accomplish at least a portion of its tasks via access toa JavaScript evaluation engine, such the PHP JavaScript extensions(SpiderMonkey).

FIG. 5B illustrates the interfaces for client object-oriented methods510 to be executed from the application 206 in the client device 202.The methods 510 include a script access method 512 and a scriptexecution method 514. The script access method 512, named “setXMLURL”,facilitates the downloading and parsing of the same XML text fileutilized in the server device 204, as described above. The script accessmethod 512 accepts an input parameter labeled “url”, which is acharacter string including a Uniform Resource Locator (URL) by which theclient device 202 may retrieve the XML file via the Internet or anothercommunication network. In one implementation, the script access method512 retrieves the XML file from a communication node, such as the serverdevice 204. In one example, the script access method 512 is executedafter a JSValidator object has been created, as is shown in FIG. 8A,described below. In another example, the script access method 512 mayalso serve as a constructor method for creating a JSValidator object, asis accomplished via the constructor method 502 of FIG. 5A. In otherexamples, the input parameter for the script access method 512 may notbe a URL, but may instead include other information for locating andretrieving the XML file, such as a file name and/or path.

The script execution method 514 for the client device 202, called“executeScript”, accepts at least two input parameters, in a fashionsimilar to that of the script execution method 504 for the server device204. The first parameter (“jsld”) is a character string identifying theparticular script 210 within the XML file that is to be executed. Thenext one or more parameters are based on the input data 212 receivedfrom the user, and are employed by executeScript to return the result214 a to the application 206. As with the script execution method 504,the result of the script execution method 514 is a character string,although other data formats for the result 214 a may be used in otherexamples.

FIG. 6 illustrates an example text file 600 in XML format which definestwo separate scripts 210: an addition script 602 and a multiplicationscript 604. In this particular example, the extent of the scripts 602,604 is defined via “scripts” tag, while each individual script 602, 604(and associated script identifiers and input parameters) is delimitedvia “row” tags. For each script 602, 604, an identifier (delimited by“id” tags), a list of input parameters (bounded by “params” tags), andthe script itself (“bounded by “script” tags) is provided. For example,the addition script 602 is associated with the “add” identifier,receives two input parameters (A and B), and returns a result (“retVal”)with a value equal to the sum of the input parameters. Similarly, themultiplication script 604 is identified by the string “multi”, receivestwo input parameters (A and B), and returns a result (“retVal”) with avalue equal to the product of the input parameters. While the exampletext file 600 includes two scripts 602, 604, other text files mayinclude one or more scripts.

FIG. 7 illustrates an example gaming text file 700 that may be employedin an online gaming environment, such as FarmVille™, produced by Zynga®,Inc. The XML file 700 includes a script 702 calculating the number ofexperience points a user earns based on a number of virtual “crops”recently harvested and a current experience level of the user. Thescript 702, named “xpAwardedForCropsAtLevel”, receives two parameters:“numCropsJustHarvested” and “currentLevel”. In one example,numCropsJustHarvested is based at least partially on user input providedby the user, such as by way of a user interface of the client device202, while currentLevel may be stored as a value indicative of userstatus in both the client device 202 and the server device 204.

More specifically, the experience points script 702 defines programminglogic in which a user is awarded a number of experience points equal tothe number of crops just harvested if the current experience level ofthe user is less than ten. If the current experience level of the useris greater than or equal to ten, and less than twenty, the number ofexperience points awarded is five times the number of crops harvested.Otherwise, the number of experience points awarded is ten times thenumber of crops harvested. In the specific example of FIG. 7, the termfor the comparator “less than” is the escape sequence “&lt;”, as thetypical less-than character “<” is a special character employed for tagsin XML. Other characters, such as “greater than” (“>”) may be handled ina similar manner.

FIGS. 8A and 8B provide example application code for the client device202 and the server device 204 for executing the script 702 of FIG. 7. InFIG. 8A, the client application code 800 includes an objectinstantiation 802, an access method execution 804, and a scriptexecution 806. As in one example mentioned earlier, the clientapplication code 800 may cause the execution of the script 702 via theJavaScript engine built into the iOS operating system employed byseveral mobile communication devices, such as the iPhone®, and iPod®Touch by Apple, Inc. Other options for executing the JavaScript code inthe XML file, such as a JavaScript engine accessible via the Androidoperating system by Google Inc., may be employed in other examples.

In the object instantiation 802, the application 206 causes aninstantiation of a JSValidator object (labeled “jsv”) associated withthe script 702 to be executed. In one example, the class associated withthe object is defined in the application 206. In at least one example,the instantiation of the object may include any memory allocation andinitialization of the object in an example. In addition, an accessmethod execution 804 may be performed by calling the script accessmethod 512 (FIG. 5B) associated with the instantiated object (jsv) toset a URL by which the object may download and parse the script 702. Inthis particular example, the URL is “http://myremoteserver/js.xml”. Inone implementation, “myremoteserver” is a URL address for the serverdevice 204. In some cases, the script access method 512 may not beemployed if the location or address of the XML file 700 is set, and thefile 700 is downloaded, in response to instantiating the object.

At one or more points during execution of the application 206, theclient device 202 may receive input data 212, such as from a user of theclient device 202 via a user interface. In this example, the input data212 reflects a number of crops the user has harvested recently in thegame. In response to receiving the input data 212, the application 206may perform the script execution 806 shown in FIG. 8A, in which theapplication 206 calls the script execution method (executeScript) 514 ofFIG. 5B associated with the instantiated object, passing toexecuteScript the identifier for the experience points script 702(“xpAwardedForCropsAtLevel”), along with the input parameters expectedby executeScript. In this example, the variable “numHarvestedCrops”holds the current number of crops harvested by the user, and thevariable “currentLevel” specifies the current experience level of theuser. As discussed earlier, the number of harvested crops may beretrieved directly from, or based upon, the input data 212, while thecurrent user experience level may be maintained within a data storagearea of the client device 202. In response to the call to executeScript,the script 702 is executed using the input parameters to yield theresult 214 a, which may be expressed as a character string. The result214 a may then be converted to, or interpreted as, an integer value(intValue), which is stored in an integer variable (xpAwarded). In oneexample, the result 214 a may then be presented to the user via the userinterface of the client device 202 without awaiting any action from theserver device 204.

FIG. 8B illustrates example server application code 810 that may beexecuted in the application 208 on the server device 204. As with theexample client application code 800, the server application code 810 mayinclude an object instantiation 812 and a script execution 814. In anembodiment, the application 208 may be written in the PHP language, andaccess a JavaScript engine (such as SpiderMonkey, which is suppliedthrough extensions of the PHP language) in order to initiate executionof the script 702.

In the object instantiation 812, the application 208 passes the name ofthe XML file containing the script 702 (js.xml) to the constructormethod 502 (FIG. 5A) while instantiating a new JSValidator object thatis referred to via the object name “jsv”. In this example, the XML file(js.xml) is accessible locally to the server device 204. In otherinstances, the XML file may be located in a different server accessiblevia the Internet or another communication network, and thus may beaddressed via a URL or another addressing mechanism in a manner similarto that employed by the client device 202.

When the server device 204 receives input data 212 from the clientdevice 202, as illustrated in FIG. 2A, the application 208 executing inthe server device 204 may initiate the script execution 814 by callingthe executeScript method of the instantiated object with the inputparameters expected by associated experience points script 702. Asdiscussed in connection with FIG. 7, the parameters are the scriptidentifier (xpAwardedForCropsAtLevel), the number of crops recentlyharvested by the user ($numHarvestedCrops), and the current experiencelevel of the user ($user→currentlevel). In one example, the number ofcrops harvested may be represented in the input data 212 received fromthe client device 202, while the user experience level may be retrievedfrom data storage coupled with the server device 204, such as thedatabase 216 (FIG. 2A) associated with the user. In anotherimplementation, the user experience level may be supplied in the inputdata 212.

The value returned from the script 702 is then assigned to the variable“$xpAwarded”. In one example, the return value may be saved in thedatabase 216 that is associated with the user (for instance, a binarylarge object, or “BLOB”) and is coupled with the server device 204. Thestored value may then be subsequently retrieved to perform otheroperations associated with the online game.

In at least some of the examples discussed herein, the execution of thesame script from applications in both a client and a server mayfacilitate server validation of operations occurring in the clientwithout the client having to await a validation response from theserver. For example, in situations in which a client receives a userinput and subsequently presents results from that input to the user, theclient may forward the user input to the server, perform the operationsdesired via the scripts described herein to produce the resultsinternally in the client, and then present those results immediately tothe user. Concurrently, the server may receive the user input from theclient and perform the same operations using the same script to yieldthe same results without providing a response to the client, possiblystoring those results locally for later use. By providing the user inputto the server instead of the results of that input, the server is ableto duplicate, and thereby validate, those results, thus preventing anypossible spoofing of results in the client while accelerating thepresentation of the results to the user.

Additionally, by implementing the programming logic to be executed inboth the client and the server by way of a text file, the text file maybe downloaded to, or retrieved by, the client each time the clientapplication begins execution, each time the client is powered up, orsome other convenient time, quickly and efficiently. Thus, alteration ofthe logic represented in the scripts of the text file does not require achange to the client application or the server application, thus savingvaluable time that might otherwise be wasted in “pushing” a new versionor update of the client application to the client device. Moreover, byusing the same text file (and, thus, the same scripts) for both theclient and the server, the probability of employing different versionsof the associated programming logic in the client and the server isreduced considerably.

Systems and Methods

FIG. 9 illustrates an example data flow between the components of system900. In particular embodiments, system 900 can include client system930, social networking system 920 a, and game networking system 920 b.The components of system 900 can be connected to each other in anysuitable configuration, using any suitable type of connection. Thecomponents may be connected directly or over any suitable network.Client system 930, social networking system 920 a, and game networkingsystem 920 b can each have one or more corresponding data stores such aslocal data store 925, social data store 945, and game data store 965,respectively. Social networking system 920 a and game networking system920 b can also have one or more servers that can communicate with clientsystem 930 over an appropriate network. Social networking system 920 aand game networking system 920 b can have, for example, one or moreinternet servers for communicating with client system 930 via theInternet. Similarly, social networking system 920 a and game networkingsystem 920 b can have one or more mobile servers for communicating withclient system 930 via a mobile network (e.g., GSM, PCS, Wi-Fi, WPAN,etc.). In some embodiments, one server may be able to communicate withclient system 930 over both the Internet and a mobile network. In otherembodiments, separate servers can be used.

Client system 930 can receive and transmit data 923 to and from gamenetworking system 920 b. This data can include, for example, web pages,messages, game inputs, game displays, HTTP packets, data requests,transaction information, updates, and other suitable data. At some othertime, or at the same time, game networking system 920 b can communicatedata 943, 947 game state information, game system account information,page info, messages, data requests, updates, etc.) with other networkingsystems, such as social networking system 920 a (e.g., Facebook,Myspace, etc.). Client system 930 can also receive and transmit data 927to and from social networking system 920 a. This data 927 can include,for example, web pages, messages, social graph information, socialnetwork displays, HTTP packets, data requests, transaction information,updates, and other suitable data.

Communication between client system 930, social networking system 920 a,and game networking system 920 b can occur over any appropriateelectronic communication medium or network using any suitablecommunications protocols. For example, client system 930, as well asvarious servers of the systems described herein, may include TransportControl Protocol/Internet Protocol (TCP/IP) networking stacks to providefor datagram and transport functions. Of course, any other suitablenetwork and transport layer protocols can be utilized.

In addition, hosts or end-systems described herein may use a variety ofhigher layer communications protocols, including client-server (orrequest-response) protocols, such as the HyperText Transfer Protocol(HTTP) and other communications protocols, such as HTTP-S, FTP, SNMP,TELNET, and a number of other protocols, may be used. In addition, aserver in one interaction context may be a client in another interactioncontext. In particular embodiments, the information transmitted betweenhosts may be formatted as HyperText Markup Language (HTML) documents.Other structured document languages or formats can be used, such as XML,and the like. Executable code objects, such as JavaScript andActionScript, can also be embedded in the structured documents.

In some client-server protocols, such as the use of HTML over HTTP, aserver generally transmits a response to a request from a client. Theresponse may comprise one or more data objects. For example, theresponse may comprise a first data object, followed by subsequentlytransmitted data objects. In particular embodiments, a client requestmay cause a server to respond with a first data object, such as an HTMLpage, which itself refers to other data objects. A client application,such as a browser, will request these additional data objects as itparses or otherwise processes the first data object.

With a client-server environment in which the virtual games may run, oneserver system, such as game networking system 920 b, may supportmultiple client systems 930. At any given time, there may be multipleplayers at multiple client systems 930 all playing the same virtualgame. In practice, the number of players playing the same game at thesame time may be very large. As the game progresses with each player,multiple players may provide different inputs to the virtual game attheir respective client systems 930, and multiple client systems 930 maytransmit multiple player inputs and/or game events to game networkingsystem 920 b for further processing. In addition, multiple clientsystems 930 may transmit other types of application data to gamenetworking system 920 b.

In particular embodiments, a computed-implemented game may be atext-based or turn-based game implemented as a series of web pages thatare generated after a player selects one or more actions to perform. Theweb pages may be displayed in a browser client executed on client system930. As an example and not by way of limitation, a client applicationdownloaded to client system 930 may operate to serve a set of web pagesto a player. As another example and not by way of limitation, acomputer-implemented game may be an animated or rendered game executableas a stand-alone application or within the context of a web page orother structured document. In particular embodiments, thecomputer-implemented game may be implemented using Flash-basedtechnologies. As an example and not by way of limitation, a virtual gamemay be fully or partially implemented as a SWF object that is embeddedin a web page and executable by a Flash® media player plug-in. Inparticular embodiments, one or more described web pages may beassociated with or accessed by social networking system 920 a. Thisdisclosure contemplates using any suitable application for the retrievaland rendering of structured documents hosted by any suitablenetwork-addressable resource or website.

In a particular embodiment, one or more objects of the virtual game maybe represented as a Flash object. Flash may manipulate vector and rastergraphics, and supports bidirectional streaming of audio and video.“Flash” may mean the authoring environment, the player, or theapplication files. In particular embodiments, client system 930 mayinclude a Flash client. The Flash client may be configured to receiveand run Flash application or game object code from any suitablenetworking system (such as, for example, social networking system 920 aor game networking system 920 b). In particular embodiments, the Flashclient may be run in a browser client executed on client system 930. Aplayer can interact with Flash objects using client system 930 and theFlash client. The Flash objects can represent a variety of in-gameobjects. Thus, the player may perform various in-game actions on variousin-game objects by making various changes and updates to the associatedFlash objects.

In particular embodiments, in-game actions can be initiated by clickingor similarly interacting with a Flash object that represents aparticular in-game object. For example, a player can interact with aFlash object to use, move, rotate, delete, attack, shoot, or harvest anin-game object. This disclosure describes performing any suitablein-game action by interacting with any suitable Flash object. Inparticular embodiments, when the player makes a change to a Flash objectrepresenting an in-game object, the client-executed game logic mayupdate one or more game state parameters associated with the in-gameobject.

To ensure synchronization between the Flash object shown to the playerat client system 930, the Flash client may send the events that causedthe game state changes to the in-game object to game networking system920 b. However, to expedite the processing and hence the speed of theoverall gaming experience, the Flash client may collect a batch of somenumber of events or updates into a batch file. The number of events orupdates may be determined by the Flash client dynamically or determinedby game networking system 920 b based on server loads or other factors.For example, client system 930 may send a batch file to game networkingsystem 920 b whenever 50 updates have been collected or after athreshold period of time, such as every minute.

In particular embodiments, when the player 101 plays the virtual game onclient system 930, game networking system 920 b may serialize all thegame-related data, including, for example and without limitation, gamestates, game events, user inputs, for this particular user and thisparticular game into a binary large object (BLOB) and store the BLOB ina database. The BLOB may be associated with an identifier that indicatesthat the BLOB contains the serialized game-related data for a particularplayer and a particular virtual game. In particular embodiments, while aplayer is not playing the virtual game, the corresponding BLOB may bestored in the database. This enables a player to stop playing the gameat any time without losing the current state of the game the player isin. When a player resumes playing the game next time, game networkingsystem 920 b may retrieve the corresponding BLOB from the database todetermine the most-recent values of the game-related data. In particularembodiments, while a player is playing the virtual game, game networkingsystem 920 b may also load the corresponding BLOB into a memory cache sothat the game system may have faster access to the BLOB and thegame-related data contained therein.

In particular embodiments, one or more described web pages may beassociated with a networking system or networking service. However,alternate embodiments may have application to the retrieval andrendering of structured documents hosted by any type ofnetwork-addressable resource or website. Additionally, as used herein, auser may be an individual, a group, or an entity (such as a business orthird party application).

Particular embodiments may operate in a wide area network environment,such as the Internet, including multiple network-addressable systems.FIG. 10 illustrates an example network environment 1000 in which variousexample embodiments may operate. Network cloud 1060 generally representsone or more interconnected networks, over which the systems and hostsdescribed herein can communicate. Network cloud 1060 may includepacket-based wide area networks (such as the Internet), privatenetworks, wireless networks, satellite networks, cellular networks,paging networks, and the like. As FIG. 10 illustrates, particularembodiments may operate in a network environment 1000 comprising one ormore networking systems, such as social networking system 1020 a, gamenetworking system 1020 b, and one or more client systems 1030. Thecomponents of social networking system 1020 a and game networking system1020 b operate analogously; as such, hereinafter they may be referred tosimply as networking system 1020. Client systems 1030 are operablyconnected to the network environment 1000 via a network serviceprovider, a wireless carrier, or any other suitable means.

Networking system 1020 is a network-addressable system that, in variousexample embodiments, comprises one or more physical servers 1022 anddata stores 1024. The one or more physical servers 1022 are operablyconnected to network cloud 1060 via, by way of example, a set of routersand/or networking switches 1026. In an example embodiment, thefunctionality hosted by the one or more physical servers 1022 mayinclude web or HTTP servers, FTP servers, as well as, withoutlimitation, web pages and applications implemented using Common Gatewayinterface (CGI) script, PHP Hyper-text Preprocessor (PHP), Active ServerPages (ASP), Hyper Text Markup Language (HTML), Extensible MarkupLanguage (XML), Java, JavaScript, Asynchronous JavaScript and XML(AJAX), Flash, ActionScript, and the like.

Physical servers 1022 may host functionality directed to the operationsof networking system 1020, Hereinafter servers 1022 may be referred toas server 1022, although server 1022 may include numerous servershosting, for example, networking system 1020, as well as other contentdistribution servers, data stores, and databases. Data store 1024 maystore content and data relating to, and enabling, operation ofnetworking system 1020 as digital data objects. A data object, inparticular embodiments, is an item of digital information typicallystored or embodied in a data file, database, or record. Content objectsmay take many forms, including: text (e.g., ASCII, SGML, HTML), images(e.g., jpeg, tif and gif), graphics (vector-based or bitmap), audio,video (e.g., mpeg), or other multimedia, and combinations thereof.Content object data may also include executable code objects (e.g.,games executable within a browser window or frame), podcasts, etc.Logically, data store 1024 corresponds to one or more of a variety ofseparate and integrated databases, such as relational databases andObject-oriented databases, which maintain information as an integratedcollection of logically related records or files stored on one or morephysical systems. Structurally, data store 1024 may generally includeone or more of a large class of data storage and management systems. Inparticular embodiments, data store 1024 may be implemented by anysuitable physical system(s) including components, such as one or moredatabase servers, mass storage media, media library systems, storagearea networks, data storage clouds, and the like. In one exampleembodiment, data store 1024 includes one or more servers, databases(e.g., MySQL), and/or data warehouses. Data store 1024 may include dataassociated with different networking system 1020 users and/or clientsystems 1030.

Client system 1030 is generally a computer or computing device includingfunctionality for communicating (e.g., remotely) over a computernetwork. Client system 1030 may be a desktop computer, laptop computer,personal digital assistant (PDA), in or out-of-car navigation system,smart phone or other cellular or mobile phone, or mobile gaming device,among other suitable computing devices. Client system 1030 may executeone or more client applications, such as a web browser (e.g., MicrosoftInternet Explorer, Mozilla Firefox, Apple Safari, Google Chrome, andOpera), to access and view content over a computer network. Inparticular embodiments, the client applications allow a user of clientsystem 1030 to enter addresses of specific network resources to beretrieved, such as resources hosted by networking system 1020. Theseaddresses can be URLs and the like. In addition, once a page or otherresource has been retrieved, the client applications may provide accessto other pages or records when the user “clicks” on hyperlinks to otherresources. By way of example, such hyperlinks may be located within theweb pages and provide an automated way for the user to enter the URL ofanother page and to retrieve that page.

A web page or resource embedded within a web page, which may itselfinclude multiple embedded resources, may include data records, such asplain textual information, or more complex digitally encoded multimediacontent, such as software programs or other code objects, graphics,images, audio signals, videos, and so forth. One prevalent markuplanguage for creating web pages is the Hypertext Markup Language (HTML).Other common web browser-supported languages and technologies includethe Extensible Markup Language (XML), the Extensible Hypertext MarkupLanguage (XHTML), JavaScript, Flash, ActionScript, Cascading Style Sheet(CSS), and, frequently, Java. By way of example, HTML enables a pagedeveloper to create a structured document by denoting structuralsemantics for text and links, as well as images, web applications, andother objects that can be embedded within the page. Generally, a webpage may be delivered to a client as a static document; however, throughthe use of web elements embedded in the page, an interactive experiencemay be achieved with the page or a sequence of pages. During a usersession at the client, the web browser interprets and displays the pagesand associated resources received or retrieved from the website hostingthe page, as well as, potentially, resources from other websites.

When a user at a client system 1030 desires to view a particular webpage (hereinafter also referred to as target structured document) hostedby networking system 1020, the user's web browser, or other documentrendering engine or suitable client application, formulates andtransmits a request to networking system 1020. The request generallyincludes a URL or other document identifier as well as metadata or otherinformation. By way of example, the request may include informationidentifying the user, such as a user ID, as well as informationidentifying or characterizing the web browser or operating systemrunning on the user's client system 1030. The request may also includelocation information identifying a geographic location of the user'sclient system 1030 or a logical network location of the user's clientsystem 1030. The request may also include a timestamp identifying whenthe request was transmitted.

Although the example network environment 1000 described above andillustrated in FIG. 10 is described with respect to social networkingsystem 1020 a and game networking system 1020 b, this disclosureencompasses any suitable network environment using any suitable systems.As an example and not by way of limitation, the network environment mayinclude online media systems, online reviewing systems, online searchengines, online advertising systems, or any combination of two or moresuch systems.

FIG. 11 illustrates an example computing system architecture, which maybe used to implement a server 1022 or a client system 1030. In oneembodiment, hardware system 1100 comprises a processor 1102, a cachememory 1104, and one or more executable modules and drivers, stored on atangible computer-readable medium, directed to the functions describedherein. Additionally, hardware system 1100 may include ahigh-performance input/output (I/O) bus 1106 and a standard I/O bus1108. A host bridge 1110 may couple processor 1102 to high-performanceI/O bus 1106, whereas I/O bus bridge 1112 couples the two buses 1106 and1108 to each other. A system memory 1114 and one or morenetwork/communication interfaces 1116 may couple to bus 1106. Hardwaresystem 1100 may further include video memory (not shown) and a displaydevice coupled to the video memory. Mass storage 1118 and I/O ports 1120may couple to bus 1108. Hardware system 1100 may optionally include akeyboard, a pointing device, and a display device (not shown) coupled tobus 1108. Collectively, these elements are intended to represent a broadcategory of computer hardware systems, including but not limited togeneral purpose computer systems based on the x86-compatible processorsmanufactured by Intel Corporation of Santa Clara, Calif., and thex86-compatible processors manufactured by Advanced Micro Devices (AMD),Inc., of Sunnyvale, Calif., as well as any other suitable processor.

The elements of hardware system 1100 are described in greater detailbelow. In particular, network interface 1116 provides communicationbetween hardware system 1100 and any of a wide range of networks, suchas an Ethernet (e.g., IEEE 802.3) network, a backplane, etc. Massstorage 1118 provides permanent storage for the data and programminginstructions to perform the above-described functions implemented inservers 822 of FIG. 8, whereas system memory 1114 (e.g., DRAM) providestemporary storage for the data and programming instructions whenexecuted by processor 1102. I/O ports 1120 are one or more serial and/orparallel communication ports that provide communication betweenadditional peripheral devices, which may be coupled to hardware system1100.

Hardware system 1100 may include a variety of system architectures, andvarious components of hardware system 1100 may be rearranged. Forexample, cache memory 1104 may be on-chip with processor 1102.Alternatively, cache memory 1104 and processor 1102 may be packedtogether as a “processor module,” with processor 1102 being referred toas the “processor core.” Furthermore, certain embodiments of the presentdisclosure may not include all of the above components. For example, theperipheral devices shown coupled to standard I/O bus 1108 may couple tohigh-performance I/O bus 1106. In addition, in some embodiments, only asingle bus may exist, with the components of hardware system 1100 beingcoupled to the single bus. Furthermore, hardware system 1100 may includeadditional components, such as additional processors, storage devices,or memories.

An operating system manages and controls the operation of hardwaresystem 1100, including the input and output of data to and from softwareapplications (not shown). The operating system provides an interfacebetween the software applications being executed on the hardware system1100 and the hardware components of the hardware system 1100. Anysuitable operating system may be used, such as the LINUX OperatingSystem, the Apple Macintosh Operating System, available from AppleComputer Inc. of Cupertino, Calif., UNIX operating systems, Microsoft®Windows® operating systems, BSD operating systems, and the like. Ofcourse, other embodiments are possible. For example, the functionsdescribed herein may be implemented in firmware or on anapplication-specific integrated circuit.

Furthermore, the above-described elements and operations can becomprised of instructions that are stored on non-transitory storagemedia. The instructions can be retrieved and executed by a processingsystem. Some examples of instructions are software, program code, andfirmware. Some examples of non-transitory storage media are memorydevices, tape, disks, integrated circuits, and servers. The instructionsare operational when executed by the processing system to direct theprocessing system to operate in accord with the disclosure. The term“processing system” refers to a single processing device or a group ofinter-operational processing devices. Some examples of processingdevices are integrated circuits and logic circuitry. Those skilled inthe art are familiar with instructions, computers, and storage media.

One or more features from any embodiment may be combined with one ormore features of any other embodiment without departing from the scopeof the disclosure.

A recitation of “a”, “an,” or “the” is intended to mean “one or more”unless specifically indicated to the contrary. In addition, it is to beunderstood that functional operations, such as “awarding”, “locating”,“permitting” and the like, are executed by game application logic thataccesses, and/or causes changes to, various data attribute valuesmaintained in a database or other memory.

The present disclosure encompasses all changes, substitutions,variations, alterations, and modifications to the example embodimentsherein that a person having ordinary skill in the art would comprehend.Similarly, where appropriate, the appended claims encompass all changes,substitutions, variations, alterations, and modifications to the exampleembodiments herein that a person having ordinary skill in the art wouldcomprehend.

For example, the methods, game features and game mechanics describedherein may be implemented using hardware components, softwarecomponents, and/or any combination thereof. By way of example, whileembodiments of the present disclosure have been described as operatingin connection with a networking website, various embodiments of thepresent disclosure can be used in connection with any communicationsfacility that supports web applications. Furthermore, in someembodiments the term “web service” and “website” may be usedinterchangeably, and additionally may refer to a custom or generalizedAPI on a device, such as a mobile device (e.g., cellular phone, smartphone, personal GPS, personal digital assistance, personal gamingdevice, etc.), that makes API calls directly to a server. Still further,while the embodiments described above operate with business-relatedvirtual objects (such as stores and restaurants), the embodiments of theinvention can be applied to any in-game asset around which a harvestmechanic is implemented, such as a virtual stove, a plot of land, andthe like. The specification and drawings are, accordingly, to beregarded in an illustrative rather than a restrictive sense. It will,however, be evident that various modifications and changes may be madethereunto without departing from the broader spirit and scope of thedisclosure as set forth in the claims and that the disclosure isintended to cover all modifications and equivalents within the scope ofthe following claims.

What is claimed is:
 1. A method comprising: transmitting, from a serverdevice via a communication network to a client device, a text filecomprising a script defining programming logic to be executed;receiving, at the client device, input data from a user of the clientdevice for a first application executing at the client device;transmitting the input data via the communication network from theclient device to the server device; executing the script at the clientdevice from the first application using the input data to produce afirst result; and executing the script at the server device from asecond application executing at the server device using the input datato produce a second result equal to the first result.
 2. The method ofclaim 1, the first application comprising a client-side application foran online game, the second application comprising a server-sideapplication for the online game, and the input data comprising an actiontaken by the user in the online game.
 3. The method of claim 1, furthercomprising: storing the second result produced at the server device in adatabase associated with the user of the client device.
 4. The method ofclaim 1, further comprising: presenting, at the client device, the firstresult to the user.
 5. The method of claim 1, each of the first resultand the second result being produced as a text string.
 6. The method ofclaim 1, the executing of the script at the client device comprising: inthe first application executing on the client device, creating a firstobject associated with a first method, the first method to receive thetext file and at least one input parameter, and the first method toinvoke a first script evaluation engine to execute the script on theclient device using the at least one input parameter to produce thefirst result; and in the first application executing on the clientdevice, initiating execution of the script using the first method bypassing a reference to the script and the input data to the firstmethod, the input data being used in the first method for the at leastone input parameter.
 7. The method of claim 6, further comprising: inthe first application executing on the client device, initiating anaccess method associated with the first object by passing acommunication address to the access method, the access method toretrieve the text file from a communication node using the communicationaddress, the initiating of the access method occurring prior to theinitiating of the execution of the script.
 8. The method of claim 6, theexecuting of the script at the server device comprising: in the secondapplication executing on the server device, creating a second objectassociated with a second method, the second method to receive the textfile and at least one second input parameter, and the second method toinvoke a second script evaluation engine to execute the script on theserver device using the at least one second input parameter to producethe second result; and in the second application executing on the serverdevice, initiating execution of the script using the second method bypassing a reference to the script and the input data to the secondmethod, the input data being used in the second method for the at leastone second input parameter.
 9. The method of claim 8, furthercomprising: retrieving a value associated with the user of the clientdevice from a database in response to receiving the input data; andpassing the value to the second method to initiate the execution of thescript, the value being used in the second method for the at least onesecond input parameter.
 10. The method of claim 1, a programminglanguage of the first application executing on the client device beingdifferent from a programming language of the second applicationexecuting on the server device.
 11. A device comprising: at least oneprocessor; a plurality of modules comprising instructions executable onthe at least one processor, the modules comprising: a script evaluationengine; and an application comprising an object-oriented method toinvoke the script evaluation engine; and a communication interface toreceive a text file comprising a script defining programming logic to beexecuted; the application, when executed on the at least one processor,to initiate execution of the script by passing a reference to the scriptand input data to the method to produce a result; and the communicationinterface to transmit the input data to a second device.
 12. The deviceof claim 11, further comprising: a user interface to present the resultto a user.
 13. The device of claim 12, the user interface to receiveuser input from the user, the input data being based on the user input.14. The device of claim 11, the application comprising a secondobject-oriented method to initiate the receiving of the text file bypassing the second object-oriented method a communication address of acommunication node possessing the text file.
 15. The device of claim 14,the communication node comprising the second device.
 16. The device ofclaim 11, the communication interface to receive the text file inresponse to the initiation of the execution of the application.
 17. Thedevice of claim 11, the application comprising an online gamingapplication, the input data comprising an indication of user actiontaken in the online gaming application, and the result comprising atleast one of user points, a user award, a playing level, and a gamingfeature associated with the online gaming application.
 18. A devicecomprising: at least one processor; a plurality of modules comprisinginstructions executable on the at least one processor, the modulescomprising: a script evaluation engine; and an application comprising anobject-oriented method to invoke the script evaluation engine; and acommunication interface to access a text file comprising a scriptdefining programming logic to be executed, and to receive input datafrom a second device; the application, when executed on the at least oneprocessor, to initiate execution of the script by passing a reference tothe script and the input data to the method to produce a result.
 19. Thedevice of claim 18, the communication interface to transfer the textfile to the second device.
 20. The device of claim 18, furthercomprising: a database system to store user information associated withthe second device; the application, when executed on the at least oneprocessor, to store the result in the database system as part of theuser information.
 21. The device of claim 20, the application, whenexecuted on the at least one processor, to retrieve a value of the userinformation associated with the second device, and to pass the value tothe method to produce the result.
 22. A method comprising: receiving, ata first device, a text file comprising a script defining programminglogic to be executed; accessing, at a second device, the text file;receiving, at the first device, input data for a first applicationexecuting at the first device; transmitting the input data from thefirst device to the second device; executing the script at the firstdevice from the first application using the input data to produce afirst result; and executing the script at the second device from asecond application executing at the second device using the input datato produce a second result equal to the first result.